﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Universitet_Fakyltet
{
    class Faculty
    {
        public string nameOfFaculty;

        public void FillMeaningsAboutFaculty()
        {
            int countMembersOfList = 0;
            string choice = "yes";
            List<Department> departments = new List<Department>();

            do
            {
                Department departmentSample = new Department();
                departmentSample.FillMeaningsAboutDepartment();
                Console.WriteLine("Введите название факультета: ");
                nameOfFaculty = Console.ReadLine();
                Console.WriteLine("Хотите добавить еще один факультет: ");
                choice = Console.ReadLine();
                departments.Add(departmentSample);
                countMembersOfList++;
            }
            while (choice == "yes");
        }

        public void ShowInfoAboutFaculty(List<Department> departments, int countMembersOfList)
        {
            Console.WriteLine("Название кафедры: {0}", nameOfFaculty);
            for (int i = 0; i < countMembersOfList; i++)
            {
                Console.WriteLine("Название кафедры: {0}", departments[i].nameOfDepartment);
            }
        }
    }
}
